<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ include file="/pages/common/header.jsp"%>
</head>
<body>
	<div class="contentBody contentborder">
		<div class="tab-pane" id="tabPane">
			<div id="message">${message }</div>
			<div class="tab-page">
				 <h1 class="tab">订单选择</h1>
 				 <div class="contentborder">
                	 <jdf:form bean="request" scope="request">
						<form action="${dynamicDomain}/order/${action}?ajax=1" method="post">
							 <table class="inputTable">
			                 	<tr>
									<td nowrap class="label cancelBorderLeft">
										<label for="search_EQI_objectId">编号：</label>
									</td>
									<td class="content">
										<input type="text" name="search_EQI_objectId" />
									</td>
									<td nowrap class="label">
										<label for="search_GED_orderDate">订单日期：</label>
									</td>
									<td class="content">
										<input type="text" id="search_GED_orderDate" size="12" name="search_GED_orderDate" class="Wdate" onClick="WdatePicker({dateFmt:'yyyy-MM-dd',maxDate:'#F{$dp.$D(\'search_LED_orderDate\')}',readOnly:true})">
										~
									    <input type="text" id="search_LED_orderDate" size="12" name="search_LED_orderDate" class="Wdate" onClick="WdatePicker({dateFmt:'yyyy-MM-dd',minDate:'#F{$dp.$D(\'search_GED_orderDate\')}',readOnly:true})">
									</td>
			                 	</tr>
			                 	<tr>
                                	<td class="bottomLabel" nowrap colspan="4">
                                		<div class="right">
											<button type="reset">重置</button>
											<button type="submit">查询</button>
                                		</div>
									</td>
			                 </table>
			            </form>
			        </jdf:form>
				</div>
				<div class="contentborder listArea">
					<div class="toolBar">
					</div>
					<div id="tableDiv">
						<jdf:table items="items" var="currentRowObject" retrieveRowsCallback="limit" filterRowsCallback="limit" sortRowsCallback="limit" action="${action}?ajax=1">
							<jdf:export view="csv" fileName="订单.csv" tooltip="Export CSV" imageName="csv" />
							<jdf:export view="xls" fileName="订单.xls" tooltip="Export EXCEL" imageName="xls" />
							<jdf:row>
								<jdf:column property="orderNo" title="编号" style="width: 14%" />
								<jdf:column property="customerId" title="客户" style="width: 15%">
                                  <jdf:columnCollectionValue items="customers"  nameProperty="name" value="${currentRowObject.customerId}"/>(${currentRowObject.customerNo})
                                </jdf:column>
								<jdf:column property="orderDate" title="订单日期" style="width: 12%" cell="date"/>
								<jdf:column property="total" title="总计" style="width: 14%" cell="currency"/>
								<jdf:column property="quantity" title="数量" style="width: 10%"/>
								<jdf:column property="clientPo" title="客人订单编号" style="width: 15%"/>
								<jdf:column property="status" title="状态" style="width: 8%">
									<jdf:columnValue dictionaryId="1001" value="${currentRowObject.status}"/>
								</jdf:column>
								<jdf:column property="salesId" title="销售员" style="width: 8%">
									<jdf:columnCollectionValue items="users" nameProperty="userName" value="${currentRowObject.salesId}"/>
								</jdf:column>
								<jdf:column alias="操作" sortable="false" viewsAllowed="html" style="width: 5%">
									<a href="javascript:select(${currentRowObject.objectId},'${currentRowObject.orderNo}')" class="button">选择</a>
								</jdf:column>
							</jdf:row>
						</jdf:table>
					</div>
				</div>
			</div>
		</div>
	</div>
	<script type="text/javascript">
		function select(customerId,name){
			parent.$("#orderId").val(customerId).change();
			parent.$("#orderNo").val(name);
			parent.jQuery.fn.colorbox.close();
		}
	</script>
</body>
</html>